//
//  ZCFriendTableVC.m
//  SSMusic
//
//  Created by 张灿 on 16/4/18.
//  Copyright © 2016年 张灿. All rights reserved.
//

#import "ZCFriendTableVC.h"

@interface ZCFriendTableVC ()

@end

@implementation ZCFriendTableVC

- (void)viewDidLoad {
    [super viewDidLoad];
    

}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    //左侧 添加朋友
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImage:[UIImage imageNamed:@"cm2_topbar_icn_invite"] highlightImage:[UIImage imageNamed:@"cm2_topbar_icn_invite_prs"] Target:self action:@selector(addFriend)];
    
    
    //设置导航栏中间标签按钮
    UISegmentedControl *segC = [[UISegmentedControl alloc] initWithItems:@[@"关注",@"附近"]];
    
    //默认选中第一个
    [segC setSelectedSegmentIndex:0];
    
    //设置文字的颜色
    [segC setTintColor:[UIColor colorWithRed:255/255.0  green:255/255.0 blue:255/255.0 alpha:1.0]];
    //设置选中状态下的文字
    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
    dict[NSForegroundColorAttributeName] = [UIColor redColor];
    [segC setTitleTextAttributes:dict forState:UIControlStateSelected];
    
    //设置标题视图
    self.navigationItem.titleView = segC;
}

- (void)addFriend
{
    NSLog(@"add");
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

//- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
//{
//
//    return 1;
//}
//
//- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
//{
//
//    return 10;
//}

/*
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
    
    // Configure the cell...
    
    return cell;
}
*/



@end
